package com.weixing.mall.provider.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.weixing.mall.provider.api.model.vo.ActivityProductVo;
import com.weixing.mall.provider.model.domain.Activity;
import com.weixing.mall.provider.model.domain.ActivityGoods;
import com.weixing.mall.provider.model.dto.act.ActivityProductDto;
import com.weixing.mall.provider.model.query.act.ActGoodsQuery;
import com.weixing.mall.redis.order.OrderPayEnd;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 * 促销模块-活动商品表 服务类
 * </p>
 *
 * @author Small
 * @since 2019-11-16
 */
public interface IActivityGoodsService extends IService<ActivityGoods> {


    IPage findList(ActGoodsQuery query, Page initMpPage);


    Long findListTotalNum(ActGoodsQuery query);

    void addGoods(Activity activity, List<ActivityProductDto> products);

    void sortOrder(ActGoodsQuery entity);

    HashMap<String,Object> agentGoods(Page initMpPage);

    void upOrDown(long [] ids, int flag);

    void addByWholeDepot(Long deptId,Long actId);

    void addByIds(Long []ids,Long actId);


    ActivityGoods findByActIdAndItemId(Long actId, Long itemId);

    List<ActivityGoods> findByActId(Long actId);

    void divideStock(Long actId ,Long id, Integer cnt);

    void offLoading(long actId, long itemId);

    void refreshStockInRedis(Long id);

    void importActGoods(List<ActivityProductVo> listResult,Long actId) throws Exception;

    void cancelOrder(OrderPayEnd payEnd);

    void upQuery(ActGoodsQuery query);
    void downQuery(ActGoodsQuery query);
}
